package cn.iocoder.yudao.module.yyzx.service.outgoing.mysql.nurse_record;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.yyzx.dal.dataobject.nurse_record.Nurse_recordDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.yyzx.controller.admin.nurse_record.vo.*;

/**
 * 护理记录 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface Nurse_recordMapper extends BaseMapperX<Nurse_recordDO> {

    default PageResult<Nurse_recordDO> selectPage(Nurse_recordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<Nurse_recordDO>()
                .eqIfPresent(Nurse_recordDO::getCustomerId, reqVO.getCustomerId())
                .eqIfPresent(Nurse_recordDO::getContentId, reqVO.getContentId())
                .betweenIfPresent(Nurse_recordDO::getNursingTime, reqVO.getNursingTime())
                .eqIfPresent(Nurse_recordDO::getNursingContent, reqVO.getNursingContent())
                .eqIfPresent(Nurse_recordDO::getNursingCount, reqVO.getNursingCount())
                .eqIfPresent(Nurse_recordDO::getStaffId, reqVO.getStaffId())
                .eqIfPresent(Nurse_recordDO::getNursingId, reqVO.getNursingId())
                .betweenIfPresent(Nurse_recordDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(Nurse_recordDO::getId));
    }

}